<template>
	<div class="organization-section">
		<section class="poster">
			<a class="org-poster" :href="posterData.link_url == '' ? false : posterData.link_url" :target="posterData.link_url == '' ? '_Self' : '_Blank'">
				<img v-if="posterData.picture" :src="BASE_URL + posterData.picture" />
			</a>
		</section>
        <orgRow rowName="教育局" :serverType="2"></orgRow>
        <orgRow rowName="学校" :serverType="1"></orgRow>
	</div>
</template>

<script>
import orgRow from './organization-row';
export default {
    components: {
        orgRow
    },
	data() {
		return {
            posterData: [],
		};
    },
    created () {
      this.getPosterData();  
    },
	mounted() {},
	methods: {
		getPosterData() {
			let success = res => {
				this.posterData = res.data[0];
			};
			this.$ajax({
				url: 'api/carousel/banners',
				method: 'get',
				params: {
                    module:100
                },
				func: {
					success: success
				}
			});
		},
	}
};
</script>

<style lang="scss">
  .organization-section{
	padding-bottom: 100px;
	.poster{
		height: 400px;
		text-align: center;
		overflow: hidden;
	}
	.org-poster{
		display: inline-block;
	}
  }
</style>
